package cn.jiayen.example.repository;

import cn.jiayen.example.bean.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
 * Created by jiayen on 2018/5/5.
 */
@Repository
public interface UserRepository extends JpaRepository<User,Integer>{

    @Modifying
    @Query("delete from User where id in ?1 ")
    void deleteByIds(List<Integer> ids);

}
